#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Create a dictionary of parcel IDs

@author: lhackett
"""

import pandas as pd
landuse_dir = '/Users/hackettl/Library/CloudStorage/Box-Box/Land use replication/'

#%% read in parcel data

parcelnums = {}
for i in range(2009, 2019):
    if i == 2010:
        continue
    parcelnums[str(i)] = pd.read_excel(
        landuse_dir+'Data/Intersect/parcel_land'+str(i)+'_20210528.xls')
# create ID mapping
parcelnums = pd.concat(parcelnums.values(), axis = 0).reset_index(drop=True)
parcelnums = parcelnums[['FID_Pajaro_Parcel_Project', 'ID']].drop_duplicates()

#%% export 
parcelnums.to_csv(landuse_dir+'out/parcel_IDs.csv', index=False)